package com.drug.mingkang.model.vo;

import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.Date;

/**
 * 描述：财务明细vo
 * 所属项目：mingkang
 *
 * @author 依旧
 * @create 2020-08-25 09:45
 * @employ IntelliJ IDEA
 * @since 1.0.0
 */
@Data
public class FinancialDetailsVo {
    @ApiParam(name = "page", value = "页", required = true)
    private int page;
    @ApiParam(name = "limit", value = "行", required = true)
    private int limit;
    public int getPage() {
        return (page - 1) * limit;
    }
    /**
     * 分公司id
     */
    private String immId;
    /**
     * 财务id
     */
    private String id;
    /**
     * 财务金额
     */
    private Double money;
    /**
     * 操作时间
     */
    private Date optime;
    /**
     * 操作人
     */
    private String operator;
    /**
     * 明细id
     */
    private String chargeoffId;
    /**
     * 明细金额
     */
    private Double chargeoffMoney;
    /**
     * 明细状态 0出账  1入账
     */
    private Integer state;
    /**
     * 明细说明
     */
    private String remark;
    /**
     * 药品采购单id
     */
    private String drugId;
    /**
     * 原材料采购单id
     */
    private String purchaseId;

    private String startTime;
    private String overTime;
    public String getStartTime() {
        if (!StringUtils.isEmpty(startTime)){
            return startTime+ " 00:00:00";
        }
        return startTime;
    }

    public String getOverTime() {
        if (!StringUtils.isEmpty(overTime)){
            return overTime+ " 23:59:59";
        }
        return overTime;
    }




}